<template>
  <div>
    <div class="image">
      <el-form-item label="导航图片: ">
        <el-upload
          action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15"
          list-type="picture-card"
          :auto-upload="false"
        >
          <el-icon><Plus /></el-icon>
        </el-upload>
        <el-dialog v-model="dialogVisible">
          <img w-full :src="dialogImageUrl" alt="Preview Image" />
        </el-dialog> </el-form-item
      ><br />
    </div>
    <el-form :inline="true">
      <el-form-item label="导航排序: "> <el-input /> </el-form-item><br />
      <el-form-item label="导航名称: "> <el-input /> </el-form-item><br />
      <el-form-item label="导航备注: "> <el-input /> </el-form-item><br />
      <el-form-item label="导航状态: ">
        <el-switch v-model="value1" /> </el-form-item
      ><br />

      <el-form-item>
        <el-button
          type="primary"
          style="width: 400px; margin-top: 30px"
          @click="add()"
          >提交</el-button
        >
      </el-form-item>
    </el-form>
  </div>
</template>

<script setup>
import { ref } from "vue";
import { productSave } from "@/Api/YGM/api";
const value1 = ref(true);

const dialogImageUrl = ref("");

function add() {
  productSave().then((res) => {
    console.log(res);
  });
}
</script>

<style scoped>
.image {
  width: 230px;
  height: 148px;
  overflow: hidden;
}
</style>
